import { createStackNavigator } from "react-navigation";
import { DeviceEventEmitter } from "react-native";

import AboutUs from "./src/components/pages/AboutUs";
import CurrencySelection from "./src/components/pages/CurrencySelection";
import Feedback from "./src/components/pages/Feedback";
import FlowDetail from "./src/components/pages/FlowDetail";
import GetMoney from "./src/components/pages/GetMoney";
import Home from "./src/components/pages/Home";
import InvitedFriendList from "./src/components/pages/InvitedFriendList";
import InviteFriend from "./src/components/pages/InviteFriend";
import Login from "./src/components/pages/Login";
import MessageDetail from "./src/components/pages/MessageDetail";
import MessageList from "./src/components/pages/MessageList";
import NoticeDetail from "./src/components/pages/NoticeDetail";
import NoticeList from "./src/components/pages/NoticeList";
import Receiptcode from "./src/components/pages/Receiptcode";
import Receiptcodeset from "./src/components/pages/Receiptcodeset";
import Redeem from "./src/components/pages/Redeem";
import RedeemConfirm from "./src/components/pages/RedeemConfirm";
import RedeemList from "./src/components/pages/RedeemList";
import Setting from "./src/components/pages/Setting";
import Settlement from "./src/components/pages/Settlement";
import SetTradePassword from "./src/components/pages/SetTradePassword";
import Subscription from "./src/components/pages/Subscription";
import Transfer from "./src/components/pages/Transfer";
import LaunchScreen from "./src/components/pages/LaunchScreen";
import Barcode from "./src/components/pages/BarcodeComponent";

const Application = createStackNavigator(
  {
    // Test: { screen: Test },
    Login: { screen: Login },
    Home: { screen: Home },
    Setting: { screen: Setting },
    FlowDetail: { screen: FlowDetail },
    LaunchScreen: { screen: LaunchScreen },
    Receiptcodeset: { screen: Receiptcodeset },
    InvitedFriendList: { screen: InvitedFriendList },
    InviteFriend: { screen: InviteFriend },
    Transfer: { screen: Transfer },
    CurrencySelection: { screen: CurrencySelection },
    Feedback: { screen: Feedback },
    GetMoney: { screen: GetMoney },
    MessageDetail: { screen: MessageDetail },
    MessageList: { screen: MessageList },
    NoticeDetail: { screen: NoticeDetail },
    NoticeList: { screen: NoticeList },
    Receiptcode: { screen: Receiptcode },
    Redeem: { screen: Redeem },
    RedeemList: { screen: RedeemList },
    RedeemConfirm: { screen: RedeemConfirm },
    Settlement: { screen: Settlement },
    SetTradePassword: { screen: SetTradePassword },
    Subscription: { screen: Subscription },
    AboutUs: { screen: AboutUs },
    Barcode: { screen: Barcode }
  },
  {
    onTransitionEnd: function() {
      DeviceEventEmitter.emit("refresh");
    }
  }
);

console.log('__DEV__',__DEV__);

export default Application;
